package com.example.springbootdemo.service;

import com.example.springbootdemo.dao.UserDao;
import com.example.springbootdemo.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;


@Service
public class UserServiceImpl implements UserService{
    @Autowired
   UserDao userDao;
    @Override
    public User registerUser(User user) {
        return userDao.registerUser(user);
    }

    @Override
    public User searchUserByName(String username) {
        return userDao.searchUserByName(username);
    }

    @Override
    public Boolean deleteUserById(Integer id) {
        return userDao.deleteUserById(id);
    }

}
